public class Multiplayer extends Janela{
  private Ball bola;
  private Rastro rastro;
  private PowerBall pb;
 
  Multiplayer(){
    super();
    addButton("voltar", width/2, height - 30, 40, 16, "Voltar");
    font = loadFont("fontes//BradleyHandITC-48.vlw");
    bola = new Ball();
    bola.size=10;
    bola.cor = color (255,0,0);
    rastro = new Rastro(bola, color(0,0,255));
    pb = new PowerBall(bola, rastro);//, som);
    rastro.setPowerBall(pb);
     
  }
  void init(){
    fill(0);
    textFont(font,26);
  } 

  void update(){
    background(255);
    bola.x=mouseX;
    bola.y=mouseY;
    bola.desenha();
    
    rastro.start();
    if(pmouseY==mouseY && pmouseX==mouseX && pb.power>0){
      pb.power -=2;
       
   }
    else if(pb.power<40)
      pb.power++;
    else if(pb.power<10)
      rastro.zera();
        
    text("Coming Soon", width/2 - (10*5.8), height/2 - (5.5));
    
    if(keyPressed)
      setActive(principal);
  }
  void objectClick(){
    String s = getObjectClickedId();
    if (s.equals("voltar")) setActive(principal);
  }
}
